package com.chenxin.transaction.controller;

import com.chenxin.transaction.service.AccountInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class LisiController {

    @Autowired
    private AccountInfoService accountInfoService;

    @RequestMapping("/transfer")
    public String transfer(Double amount) {
        //李四增加金额
        accountInfoService.updateAccountBalance("2", amount);
        return "bank2" + amount;
    }
}
